# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=qqc2-desktop-style5
pkgver=5.113.0
pkgrel=0
pkgdesc="A style for Qt Quick Controls 2 to make it follow your desktop theme"
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-3.0-only AND (GPL-2.0-only OR GPL-3.0-only)"
depends="
	qt5-qtgraphicaleffects
	qt5-qtquickcontrols2
	"
depends_dev="
	kconfigwidgets5-dev
	kiconthemes5-dev
	kirigami2-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtx11extras-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
_repo_url="https://invent.kde.org/frameworks/qqc2-desktop-style.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/qqc2-desktop-style-$pkgver.tar.xz"
subpackages="$pkgname-dev"
builddir="$srcdir/qqc2-desktop-style-$pkgver"

replaces="qqc2-desktop-style<=5.110.0-r0"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
25e2b28b0c507a27787a4c46d79ee629cadda2c9e78ce9c2714b2411e9513a08bfbb8047d4adfaa255ae59d1bbd4a56f5d03b210a6107de3f5eb3f9f89dc85ca  qqc2-desktop-style-5.113.0.tar.xz
"
